package com.bytecodezz.app.sketch.main.model

import com.bytecodezz.app.sketch.common.base.BaseUIViewModel
import com.bytecodezz.app.base.framework.better.SingleLiveEvent

/**
 * @author: bytecodezz
 * @version: 1.0
 * @time: 2021/7/6 14:24
 * @package: com.bytecodezz.app.ui.model
 *
 * @description:
 *
 */
class MainFragmentViewModel : BaseUIViewModel() {
    //导航选择项目，根据位置选择
    val menuSelectedLiveData = SingleLiveEvent<Int>()

    //用于存储当前选中位置
    private var currentMenuIndex = 0

    fun initMenuSelected() {
        menuSelectedLiveData.value = currentMenuIndex
    }

    fun saveCurrentMenuIndex(current: Int) {
        currentMenuIndex = current
    }
}